<template>
  <nav class="app-topnav">
    <div class="container">
      <ul>
        <template v-if="userinfo.accout">
          <li><a href="javascript:;"><i class="iconfont icon-user"></i>张小宇</a></li>
        <li><a href="javascript:;">退出登录</a></li>
        </template>
        <template>
        <li><a href="javascript:;">请先登录</a></li>
        <li><a href="javascript:;">免费注册</a></li>
        </template>
        <li><a href="javascript:;">我的订单</a></li>
        <li><a href="javascript:;">会员中心</a></li>
        <li><a href="javascript:;">帮助中心</a></li>
        <li><a href="javascript:;">关于我们</a></li>
        <li><a href="javascript:;"><i class="iconfont icon-phone"></i>手机版</a></li>
      </ul>
    </div>
  </nav>
</template>

<script>
export default {
computed: {
  userinfo(){
    return this.$store.state.user.userinfo
  }
},
}
</script>

<style lang="scss" scoped>
@import "../assets/css/common.scss";
@import "../assets/css/color.scss";
@mixin set($color) {
  //   font-size: $size;
  color: $color;
}
.app-topnav {
  background: #333;
  ul {
    display: flex;
    height: 53px;
    justify-content: flex-end;
    align-items: center;
    li {
      a {
        text-decoration: none;
        padding: 0 15px;
        color: #cdcdcd;
        line-height: 1;
        display: inline-block;
        i {
          font-size: 14px;
          margin-right: 2px;
        }
        &:hover {
          @include set($xtxColor) //   color: @xtxColor;
;
        }
      }
      ~ li {
        a {
          border-left: 2px solid #666;
        }
      }
    }
  }
}
</style>